import adminModel from '../models/admin/admin'
class adminCheck{
    constructor(){

    }
    async checkEdit(req,res,next){
        // console.log(req.session)
        const admin_id = req.session.admin_id;
        let res1 = await adminModel.findOne({
            id:admin_id
        })
        // console.log(res1)
        if(res1.status === 2){
            // console.log(req.session.admin_id)
            next()
        }else {
            res.send({status:0,message:'权限不足'})
        }
    }
}
export default new adminCheck()